package com.itheima.dao;

import com.github.pagehelper.Page;
import com.itheima.pojo.Menu;
import com.itheima.pojo.Permission;

import java.util.List;
import java.util.Map;
import java.util.List;
import java.util.Set;

public interface PermissionDao {

    Set<Permission> findPermissionsByRoleId(Integer id);

    Set<Permission> findByRoleId (Integer roleId);

    Set<Permission> findPermissionById (Integer roleId);


    Page<Permission> selectByCondition (String queryString);

    void add (Permission Permission);

    void edit (Permission Permission);

    Permission findById (Integer id);

    void deleteById (Integer id);

    void deleteAssocication (Integer id);

    List<Permission> findAll ();

    void setMenuAndPermission (Map map);


    List<Menu> findMenuIdsByPermissionId (Integer id);

    List<Integer> findpermissionidsbyroleid(Integer roleId);

    Set<Permission> findByRid(Integer rid);

    List<Permission> findAllPermission();
}
